<p>AS2NDAC (AS2NaturalDocsAutoComment) is a Perl script which automatically creates NaturalDocs comments for AS2.0 Class and Interface .as files. It's based on <a target="_blank" href="http://broadcast.artificialcolors.com/index.php?p=157&more=1&c=1&tb=1&pb=1#more157">G.Wygonik's JSFL AS2.0 autodocumentor</a> for <a href="http://www.naturaldocs.org" target="_blank">NaturalDocs</a>. This alpha release creates useable comments, however, no additional options are supported, see below for proposed <a href="#roadmap">roadmap</a></p>

<p>The AS2NDAC project is listed on <a href="http://www.osflash.org/as2naturaldocsautocomment">OSFlash.org</a></p>
<h2>Current Functionality</h2>
<p>Presently the test version expects 2 filenames, <code>inputFile </code> &amp; <code>outputFile</code>. It then parses the <code>inputFile</code>, creates the NaturalDocs compatible documentation comments and writes the <code>outputFile</code>.</p>
<p>The following auto commenting takes place...:</p>
<h2>Interface definitions</h2>
<p>Only interface declarations not directly preceeded by a block comment are parsed.</p>
<ul>
<li>interface name</li>
<li>description stub</li>
<li>extended interface</li>
<li>ToDo Stub</li>
<li>Note Stub</li>
<li>Version stub</li>
<li>Author stub</li>
</ul>
<h2>Interface method declarations</h2>
<p>Only interface methods declarations not preceeded by a block comment are parsed.</p>
<ul>
<li>method name</li>
<li>description stub</li>
<li>parameter list
<ul>
<li>parameter name</li>
<li>data type</li>
<li>parameter description stub</li>

</ul></li>
<li>return type</li>
</ul>
<h2>Class definitions</h2>
<p>Only class declarations not preceeded by a block comment are parsed.</p>
<ul>
<li>class name</li>

<li>description stub</li>
<li>dynamic and intrinsic attributes are noted in the description</li>
<li>extended super class</li>

<li>implemented interfaces</li>
<li>Usage stub</li>
<li>Example stub</li>
<li>ToDo Stub</li>
<li>Note Stub</li>
<li>Version stub</li>
<li>Author stub</li>
</ul>
<h2>Class method declarations</h2>
<p>Only class methods declarations not preceeded by a block comment are parsed. Functions declared within other methods are not parsed, also functions declared as properties and defined inline will also fail to document correctly.</p>
<p>E.g. <code>public var testFunction:Function = function(){ // my code }</code>
Would fail.</p>
<ul>
<li>method name</li>
<li>description stub</li>
<li>member access (private, public, static)</li>
<li>parameter list
<ul>

<li>parameter name</li>
<li>data type</li>
<li>parameter description stub</li>
</ul></li>
<li>return type</li>
</ul>
<h2>Class property declarations</h2>
<p>Only class properties not preceeded by a block comment are parsed. Properties declared within methods are not parsed, also functions declared as properties and defined inline will also fail to document correctly.</p>
<p>E.g. <code>  public var testFunction:Function = function(){ // my code }</code>

Would fail.</p>
<ul>
<li>property/var name</li>
<li>description stub</li>
<li>member access (private, public, static)</li>
<li>data type</li>
</ul>
<p><a href="/autodoc/example.html" target="_blank">Click here</a> for a short example class autodocumented with the script.</p>
<h2>Roadmap</h2>
<p>The following features are under consideration for future releases, there are no updates planned at present. (I'm too busy! Sorry!)</p>
<p><strong>Config File</strong> - Various options specified in a (XML based) configuration file.</p>
<ul>
<li>Default author & version</li>
<li>Default documentation stubs</li>
<li>Structure specific documentation options</li>
<li>Miscellaneous documentation options</li>
</ul>
<p><strong>Multiple filename & input/output folder</strong> - I will be adding better filename support so that you can parse a set of files without writing an additional .bat script. This will be done when the code parsing has been tested properly and the feature set for single file parsing is stable.</p>
<p><strong>C# .NET based GUI version.</strong> - This is currently in development.</p>

<h2>Known issues</h2>
<ul>
<li><b>UTF8 BOM</b> - UTF BOM files seem to cause some problems.</li>
<li><b>Multiline method definitions</b> - When functions are defined over multiple lines the complete parameter list and return type are not found, since documentation comments will only include whatever is on the same line as the function keyword. You may be in the habit of creating multi-line parameter lists, (I was) and this will be addressed in a later version.</li>
</ul>
<h2>Alpha Release</h2>
<h2><a href="/autodoc/AS2.0-ND-AutoComment.zip">Download AS2NDAC v0.1 (alpha)</a></h2>
